
# 4. 打印1~100所有偶数的和 减去 所有奇数的和 的值
ous,jis = 0,0
for x in range(1,101):
    if x % 2 == 0:
        ous += x
    else:
        jis += x
print(ous-jis)

nums1 = sum([x for x in range(1,101,2)])
nums2 = sum([x for x in range(2,101,2)])
print(nums2 - nums1)


# 11. 输出 9*9 乘法口诀表。
for x in range(1,10):
    for y in range(1,x+1):
        print('',y,"*",x,' = ',y*x,end=' ')
    print()
